Skip to content

[BUG] 채팅 로직 수정#221

Merged
Moon0116 merged 2 commits intodevelopfrom
bug/220
Aug 20, 2025
Merged

[BUG] 채팅 로직 수정#221
Moon0116 merged 2 commits intodevelopfrom
bug/220

Conversation

@Moon0116
Copy link
Copy Markdown
Contributor

@Moon0116 Moon0116 commented Aug 20, 2025

📌 관련 이슈

closed #220

✨ 내용

  1. MyBatis 쿼리 수정 (src/main/resources/mappers/chat/ChatMapper.xml)
  • selectUserActiveChallengeInfo 쿼리에서 AND uc.status = 'ongoing' 조건 제거

  • 사용자의 가장 최근 챌린지 상태를 모든 status에 대해 조회하도록 변경

  • 이를 통해 failed/completed/closed 상태도 정확히 반환

    변경 전:
    WHERE uc.user_id = #{userId}
    AND uc.status = 'ongoing'
    ORDER BY uc.start_date DESC LIMIT 1

    변경 후:
    WHERE uc.user_id = #{userId}
    ORDER BY uc.start_date DESC LIMIT 1

  1. ChatService 로그 개선 (src/main/java/org/bbagisix/chat/service/ChatService.java)
  • getUserChallengeStatus 메서드의 로그 메시지 수정
  • 디버깅을 위한 명확한 로그 추가

@Moon0116 Moon0116 self-assigned this Aug 20, 2025
@Moon0116 Moon0116 added the 🐞bugfix Something isn't working label Aug 20, 2025
@Moon0116 Moon0116 linked an issue Aug 20, 2025 that may be closed by this pull request
@Moon0116 Moon0116 merged commit bffeede into develop Aug 20, 2025
1 check passed
@hoonssac hoonssac deleted the bug/220 branch August 31, 2025 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞bugfix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 채팅 로직 수정

3 participants